<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title>首页</title>
        <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
        <style>
            #container {
                border:1px solid red;
            }
            #container p{
                font-size:20px;
                color:deepskyblue;
                font-weight:bold;
            }
        </style>
    </head>
    <body>
        <div id="container"></div>
    </body>
    <script>
        $(function (){
            url1='https://m.maoyan.com/ajax/comingList?ci=103&token=&limit=10&optimus_uuid=E126E2E0A57911EBBF85C5792E05787A7D633AC498454898A423D7C7CB663AF6&optimus_risk_level=71&optimus_code=10' //链接来自猫眼官网，以手机模式访问，筛选网络中的XHR(即Ajax请求)，点网页中的待映，结果中有一条以comingList?开头，它的Request URL就是链接
            url2='http://127.0.0.1:5000/types' //必须加协议
            $.get(url2,function (data){
                //console.log(data) json格式的数据
                //console.log(typeof data)
                for(var i=0;i<data.length;i++)
                    $('#container').append('<p>'+data[i].name+'</p>')
            })
        })
    </script>
</html>